package com.xmall.bean.table;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserFormid {
    private Integer id;

    /**
    * 缓存的FormId
    */
    private String formid;

    /**
    * 是FormId还是prepayId
    */
    private Boolean isprepay;

    /**
    * 可用次数，fromId为1，prepay为3，用1次减1
    */
    private Integer useamount;

    /**
    * 过期时间，腾讯规定为7天
    */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date expireTime;

    /**
    * 微信登录openid
    */
    private String openid;

    /**
    * 创建时间
    */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date addTime;

    /**
    * 更新时间
    */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date updateTime;

    /**
    * 逻辑删除
    */
    private Boolean deleted;
}